<?php
class User extends AppModel {
    var $name = 'User';
    var $hasMany = array(
        'Book' => array(
            'className' => 'Book',
            'dependent' => true));
    var $validate = array(
        'username' => array(
            'notEmpty' => array(
                'rule' => 'notEmpty',
                'message' => 'Username cannot be left empty.'
            ),
            'isUnique' => array(
                'rule' => 'isUnique',
                'message' => 'Sorry, but this Username has been taken.'
            )
        ),
        'password' => array('rule' => 'notEmpty'),
        'password_confirm' => array('rule' => 'notEmpty')
    );
}
?>
